package com.rd.student.jike.class2.lihongming.week724_730.Day724;

/**
 * @Auther:Heinrich
 * @Date:2023/7/24-07-24-15:31
 * @Description:com.rd.student.jike.class2.lihongming.Day0724
 * @version:1.0
 */
public class TestThreadGroup {
    public static void main(String[] args) {
        ThreadGroup currentGroup = Thread.currentThread().getThreadGroup();
        ThreadGroup parentGroup = currentGroup.getParent();
        System.out.println(currentGroup.getName());
        System.out.println(parentGroup.getName());
        ThreadGroup group1 = new ThreadGroup("subTreadGroup1");
        ThreadGroup group2 = new ThreadGroup(group1,"subTreadGroup1");
        System.out.println(group1.getParent().getName());
        System.out.println(group2.getParent().getName());
    }
}

